#include "Event.h"

namespace gdn
{
	Event::Event()
	{
		type = Event::Count;
	}

	Event::Event( Type theType )
	{
		type = theType;
	}

	Event::Event( Type theType, Vector2f vector2 )
	{
		type = theType;

		if ( type == MouseMoved )
		{
			x = vector2.x;
			y = vector2.y;
		}
		else if ( type == WindowResized )
		{
			width = vector2.x;
			height = vector2.y;
		}
	}

	Event::Event( Type theType, char theText )
	{
		type = theType;

		if ( type == TextEntered )
		{
			text = theText;
		}
	}

	Event::Event( Type theType, Mouse::Button theMouseButton )
	{
		type = theType;

		if ( type == MouseButtonPressed or type == MouseButtonReleased )
		{
			mouseButton = theMouseButton;
		}
	}

	Event::Event( Type theType, Key::Code theKey )
	{
		type = theType;

		if ( type == KeyPressed or type == KeyReleased )
		{
			key = theKey;
		}
	}
}
